<!--{template common/header}-->
<!--{template focus/header}-->
{if $_G[gp_task]=='content'}
<form action="index.php" method="POST" name="search">
    <input type="hidden" name="formhash" value="{FORMHASH}" />
	<input type="hidden" name="option" value="focus">
	<input name="task" type="hidden" value="content">
    <table class="datalist">
        <tr>
            <td colspan="3">
                搜索
            </td>
        </tr>
        <tr>
            <td width="30%">
                URL:
            </td>
            <td>
                <input type="text" name="keyword" value="$keyword" size="40">{$count}
            </td>
            <td rowspan="3" width="200">
                <button name="do" value='' type="submit" class="btn">
                    搜索一下
                </button>
            </td>
        </tr>
        <tr>
            <td width="30%">
                类型:
            </td>
            <td>
                <select name="cattype">
                    <option value=""<!--{if $cattype==''}-->selected=true <!--{/if}-->>不限</option>
                    <!--{loop $types $k $v}--><option value='$k'<!--{if $cattype==$k}-->selected=true <!--{/if}-->>$v</option>
                    <!--{/loop}-->
                </select>
            </td>
        </tr>
    </table>
</form>
<br>
<form action="index.php" method="get" name="search">
    <input type="hidden" name="formhash" value="{FORMHASH}" />
	<input type="hidden" name="option" value="focus">
    <input type="hidden" name="task" value="contentrule">
    <table class="datalist">
        <tr>
            <td align=center>
                {$orderid}
            </td>
            <td align=center>
                {$orderurl}
            </td>
            <td align=center>
                编码
            </td>
            <td align=center>
                操作
            </td>
        </tr>
        <!--{loop $listarr $v}-->
        <tr align="center">
            <td>
                <input class="checkbox" type="checkbox" name="ids[]" value="$v[id]">$v[id]
            </td>
            <td align='left'>
                $v[url]
            </td>
            <td nowrap>
                $v[charset]
            </td>
            <td>
                <a href="index.php?option=focus&task=contentrule&id=$v[id]">设置</a>|<a href="index.php?option=focus&task=testcontentrule&id=$v[id]" title="读取新内容">测试</a>|<A onclick="return confirm('确定要删除么？');" href="index.php?option=focus&task=delcontentrule&id=$v[id]">删除</A>
            </td>
        </tr>
        <!--{/loop}-->
        <tr>
            <td>
                <input class="checkbox" type="checkbox" name="chkall" class="header" onclick="checkall(this.form,'ids')" title="全选">全选&nbsp;
            </td>
            <td colspan="3">
                {$multipage}
            </td>
        </tr>
    </table>
    <br style="clear:both">
    <input type="submit" name="savesubmit" value="提交" class="btn" onclick="return confirm('您确定删除选中的条目吗?')"><input type="hidden" name="formhash" value="{FORMHASH}" /><input type="submit" name="addnew" value="添加" class="btn" onclick="document.adminform.op.value='contentrule';return true;">
</form>
{elseif $_G[gp_task]=='contentrule'}
<form method="post" name="thevalueform" id="theform" action="index.php?option=focus&task=contentrule" enctype="multipart/form-data"> 
	<input type="hidden" name="formhash" value="{FORMHASH}"> 
	<table cellspacing="0" cellpadding="0" width="100%"  class="datalist"> 
		<tr id="tr_title"> 
			<th>网站名称</th> 
			<td colspan="2"><input name="title" type="text" id="title" size="30" value="{$row[title]}" style='width:98%;' /></td> 
		</tr> 
		<tr id="tr_url"> 
			<th>网址</th> 
			<td colspan="2"><input name="url" type="text" id="url" size="30" value="{$row[url]}" style='width:98%;' /></td> 
		</tr> 
		<tr id="tr_charset"> 
			<th>编码</th> 
			<td colspan="2">
				<select name="charset" id="charset"> 
					<option value="auto"{if $row[charset]=='auto'} selected{/if}>自动侦测</option> 
					<option value="gb2312"{if $row[charset]=='gb2312'} selected{/if}>gb2312</option> 
					<option value="utf-8"{if $row[charset]=='utf-8'} selected{/if}>utf-8</option> 
					<option value="big5"{if $row[charset]=='big5'} selected{/if}>big5</option> 
				</select> 
			</td> 
		</tr> 
		<tr id="tr_rule"> 
			<th><b>规则</b><br>内容部分用\{content\}代替，其它未知的字符(如空格、TAB、回车等用\{ignore\}代替)。</th> 
			<td colspan="2"><textarea name="rule" style="width:98%;" rows="10">{$row[rule]}</textarea></td> 
		</tr> 
		<tr id="tr_replace"> 
			<th><b>内容替换规则</b></th> 
			<td colspan="2"><textarea name="replace" style="width:98%;" rows="10">{$row[replace]}</textarea></td> 
		</tr> 
	</table> 
	<input type="hidden" name="id" value="{$row[id]}">
	<input type="submit" name="savesubmit" value="{lang Submit}" class="btn"> 
	<input type="reset" name="importreset" value="{lang Reset}" class="btn">
</form> 
{/if}
<!--{template focus/footer}-->
<!--{template common/footer}-->
